home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Chans / lists / init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  2.7 KB  |  119 lines

  1. /* init.c: */ 
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Chans/lists/RCS/init.c,v 6.0 1991/12/18 20:10:43 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Chans/lists/RCS/init.c,v 6.0 1991/12/18 20:10:43 jpo Rel $
  9.  *
  10.  * $Log: init.c,v $
  11.  * Revision 6.0  1991/12/18  20:10:43  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17.  
  18. #include "dlist.h"
  19. #include <isode/quipu/attrvalue.h>
  20.  
  21. AttributeType at_Member;
  22. AttributeType at_Owner;
  23. AttributeType at_Permit;
  24. AttributeType at_Policy;
  25. AttributeType at_ORAddress;
  26. AttributeType at_RFC822;
  27. AttributeType at_GroupMember;
  28. AttributeType at_RoleOccupant;
  29.  
  30. OID dl_oc;
  31. OID role_oc;
  32.  
  33. extern LLog * log_dsap;
  34.  
  35. pp_quipu_init (str)
  36. char * str;
  37. {
  38.         pp_syntaxes ();
  39.         pp_initialise(str, 0);
  40.         or_myinit();
  41. }
  42.  
  43. mhs_syntaxes ()
  44. {
  45.     orAddr_syntax ();
  46.     orName_syntax ();
  47.     permit_syntax ();
  48.     policy_syntax ();
  49. }
  50.  
  51. pp_syntaxes () {
  52.     mhs_syntaxes ();
  53.         policy_syntax ();
  54. }
  55.  
  56. pp_quipu_run ()
  57. {
  58. int result = TRUE;
  59. int ufn_init ();
  60.  
  61.     if ((dl_oc = name2oid ("ppDistributionList")) == NULLOID) {
  62.         result = FALSE;
  63.         LLOG (log_dsap,LLOG_EXCEPTIONS,("ppDistributionList unknown Objectclass"));
  64.     }
  65.     if ((role_oc = name2oid ("organizationalRole")) == NULLOID) {
  66.         result = FALSE;
  67.         LLOG (log_dsap,LLOG_EXCEPTIONS,("organizationalRole unknown Objectclass"));
  68.     }
  69.         
  70.         /* DL Mandatory */
  71.     if ((at_Member = AttrT_new ("mhsDLMembers")) == NULLAttrT) {
  72.         result = FALSE;
  73.         LLOG (log_dsap,LLOG_EXCEPTIONS,("mhsDLMembers attribute unknown"));
  74.     }
  75.     if ((at_Owner    = AttrT_new ("Owner")) == NULLAttrT) {
  76.         result = FALSE;
  77.         LLOG (log_dsap,LLOG_EXCEPTIONS,("Owner attribute unknown"));
  78.     }
  79.     if ((at_Permit = AttrT_new ("mhsDLSubmitPermissions")) == NULLAttrT) {
  80.         result = FALSE;
  81.         LLOG (log_dsap,LLOG_EXCEPTIONS,("mhsDLSubmitPermissions attribute unknown"));
  82.     }
  83.  
  84.         /* DL Optional */
  85.     if ((at_Policy = AttrT_new ("dl-policy")) == NULLAttrT) {
  86.         result = FALSE;
  87.         LLOG (log_dsap,LLOG_EXCEPTIONS,("dl-policy attribute unknown"));
  88.     }
  89.  
  90.         /* MHS mail box attrs */
  91.     if ((at_ORAddress = AttrT_new ("mhsORAddresses")) == NULLAttrT) {
  92.         result = FALSE;
  93.         LLOG (log_dsap,LLOG_EXCEPTIONS,("mhsORAddresses attribute unknown"));
  94.     }
  95.     if ((at_RFC822 = AttrT_new ("rfc822Mailbox")) == NULLAttrT) {
  96.         result = FALSE;
  97.         LLOG (log_dsap,LLOG_EXCEPTIONS,("rfc822Mailbox attribute unknown"));
  98.     }
  99.  
  100.         /* X500 group member */
  101.     if ((at_GroupMember = AttrT_new ("member")) == NULLAttrT) {
  102.         result = FALSE;
  103.         LLOG (log_dsap,LLOG_EXCEPTIONS,("member attribute unknown"));
  104.     }
  105.     if ((at_RoleOccupant = AttrT_new ("RoleOccupant")) == NULLAttrT) {
  106.         result = FALSE;
  107.         LLOG (log_dsap,LLOG_EXCEPTIONS,("RoleOccupant attribute unknown"));
  108.     }
  109.  
  110.     if (result)
  111.         result = ufn_init();
  112.     else
  113.         (void) ufn_init ();
  114.  
  115.     return result;
  116. }
  117.  
  118.  
  119.